<?php

/**
 * Created by PhpStorm.
 * User: Administrator
 * Date: 2015/12/3 0003
 * Time: 9:59
 */

include 'config.php';
include 'Db.php';
include 'sModel.php';
include 'sUserInfo.php';
include 'sqlBuilder.php';

$users = sUserInfo::find([
    "FUID > 1000",
    "columns" => ["FUID", "FUNAME"],
    "order" => "FUID ASC",
    "limit" => [1, 20]
]);

#var_dump($users);

$sUser = new sUserInfo();

$sUser->FLNAME = uniqid();
$sUser->FPASSWD = uniqid();
$sUser->FUNAME = uniqid();
$sUser->FROLE = 0;

try {
    $sUser->save();
    echo $sUser->FUID;
} catch (Exception $ex) {
    echo $ex->getMessage();
}

//$smodel = new sModel(TABLE_USERINFO);
//
//$smodel->find();